package com.thx.common.datasource;

/**
 * 动态数据源储存器.
 * 
 * @author balance
 */
public class DynamicDataSourceContextHolder {

  private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();

  public static void setDataSourceType(String customerType) {
    contextHolder.set(customerType);
  }

  public static String getDataSourceType() {
    return contextHolder.get();
  }

  public static void clearDataSourceType() {
    contextHolder.remove();
  }

}
